package com.maiyawx.mall.enums;

/**
 * 公共接口返回错误码
 */
public enum CommonEnum {
    SUCCESS(0, "成功！"),
    VALID_ERROR(1, "字段校验失败！"),
    ADD_ERROR(2, "添加数据失败！"),
    SYSTEM_ERROR(-1, "系统错误！"),
    WX_ERROR(3, "微信错误码！"),
    DECODE_USERINFO_ERROR(4, "解密用户信息失败！"),
    SERVER_ERROR(5, "服务器异常!"),
    CREATE_JWT_ERROR(5, "创建令牌失败!")
    ;
    private Integer code;
    private String message;

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    CommonEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
